package com.herui.ota.enums;

import com.mlnx.common.entity.BaseExceptionMsg;

/**
 * Created by amanda.shan on 2019/7/1.
 */
public enum ResponseEnum implements BaseExceptionMsg {
    SUCESS("0000", "成功"),

    LOGIN_FAIL("1000", "登录失败"),
    PARAM_ERROR("1001", "参数错误"),

    USER_FAIL("2000", "用户失败"),
    PHONE_CODE_ERROR("2001", "短信验证码错误"),
    GET_SMS_CODE_FAIL("2002", "获取手机验证码"),

    UserExisted("002101", "用户名已存在"),
    ROLE_FAIL("003000", "角色名字重复"),
    ROLE_NO("003001", "登录角色,权限不够"),
    NO_LOGIN("003002", "请登录"),

    DOWNLOAD_FAIL("004001", "下载失败"),
    UPLOAD_FAIL("004002", "下载失败"),


    OTA_FAIL("005001", "OTA操作失败"),
    OTA_SAME("005002", "已经有相同的系列和渠道组合"),
    OTA_NOT_EXIST("005003", "产品不存在"),
    OTA_SOFT_NOT_EXIST("005004", "绑定的固件不存在"),
    OTA_SOFT_IS_ONLINE("005005", "该版本固件已经上线"),


    DEVICE_NOT_EXIST("006001", "设备不存在"),

    ;


    private String code;

    private String describe;

    ResponseEnum(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    public String getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return describe;
    }

    public ResponseEnum setCode(String code) {
        this.code = code;
        return this;
    }

    public String getDescribe() {
        return describe;
    }

    public ResponseEnum setDescribe(String describe) {
        this.describe = describe;
        return this;
    }
}
